package com.shangyueshang.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shangyueshang.model.GoodsRevenue;
import com.shangyueshang.request.PageReq;
import com.shangyueshang.response.PageResult;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;

import java.time.LocalDate;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2022/1/17 19:04
 * @version: v1.0.0
 */

public interface GoodsRevenueService extends IService<GoodsRevenue> {
	
	/**
	 * 分页查询
	 *
	 * @param pageReq
	 * @return
	 */
	PageResult<GoodsRevenue> findPage(PageReq pageReq);
	
	/**
	 * 根据sku和date查询
	 *
	 * @param shop
	 * @param sku
	 * @param date
	 * @return
	 */
	GoodsRevenue getByShopSkuTradeDate(String shop, String sku, LocalDate date);
	
	/**
	 * 导出sku营收数据
	 *
	 * @param pageReq
	 * @return
	 */
	ResponseEntity<Resource> goodsRevenueExport(PageReq pageReq);
}
